<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" 
    AutoEventWireup="false" CodeFile="Payment.aspx.vb" 
    Inherits="Accounting_Payment" title="CIMS" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <script language="javascript" type="text/javascript"> 
        function popUp(URL) { 
        day = new Date(); 
        id = day.getTime(); 
        eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1');"); 
        } 
    </script>
    
    <div id="divMain" runat="server">
        <table border="0" cellpadding="0" cellspacing="0" width="800">
            <tr><td style="font-size: 3px;height: 5px;"></td></tr>
        </table>
        
        <table border="0" cellpadding="0" cellspacing="0" width="800">
            <tr>
            <td align="center" style="font-weight: bold; font-size: 10pt; font-family: Arial">
                <asp:LinkButton ID="Payment" runat="server" Font-Underline="False"
                    ForeColor="Black" Width="64px" CausesValidation="False">Payment</asp:LinkButton></td>
            <td style="font-size: 11pt; font-family: Arial; font-weight: bold;" align="center">
                <asp:Label ID="Label4" runat="server" ForeColor="DimGray"
                    Text="|" Width="20px"></asp:Label></td>
            <td align="center" style="font-weight: bold; font-size: 10pt; font-family: Arial">
                <asp:LinkButton ID="Dispatch" runat="server" Font-Underline="False" 
                    ForeColor="#0C58A2" Width="56px" PostBackUrl="~/Accounting/Dispatch.aspx" CausesValidation="False">Dispatch</asp:LinkButton></td>
            <td style="font-size: 11pt; font-family: Arial; font-weight: bold;" align="center">
                <asp:Label ID="Label2" runat="server" ForeColor="DimGray"
                    Text="|" Width="20px"></asp:Label></td>
            <td align="center" style="font-weight: bold; font-size: 10pt; font-family: Arial; width: 5px;">
                <asp:LinkButton ID="Confirmation" runat="server" Font-Underline="False" ForeColor="#0C58A2" Width="88px" PostBackUrl="~/Accounting/Confirmation.aspx" CausesValidation="False">Confirmation</asp:LinkButton></td>
            <td style="font-size: 11pt; font-family: Arial; font-weight: bold;" align="center">
                <asp:Label ID="Label1" runat="server" ForeColor="DimGray"
                    Text="|" Width="20px"></asp:Label></td>
            <td align="center" style="font-weight: bold; font-size: 10pt; font-family: Arial; width: 137px;">
                <asp:LinkButton ID="Commission_Journal" runat="server" Font-Underline="False" 
                    ForeColor="#0C58A2" Width="136px" CausesValidation="False" PostBackUrl="~/Accounting/Commision.aspx">Commission Journal</asp:LinkButton></td>
            <td style="font-size: 11pt; font-family: Arial; font-weight: bold;" align="center">
                <asp:Label ID="Label3" runat="server" ForeColor="DimGray"
                    Text="|" Width="20px"></asp:Label></td>
            <td align="center" style="font-weight: bold; font-size: 10pt; font-family: Arial; width: 96px;">
                <asp:LinkButton ID="LinkButton1" runat="server" Font-Underline="False" 
                    ForeColor="#0C58A2" Width="96px" CausesValidation="False" PostBackUrl="~/Accounting/CashAdvance.aspx">Cash Advance</asp:LinkButton></td>
            <td align="left" style="font-weight: bold; font-size: 10pt; font-family: Arial; width: 246px;"></td>
            </tr>
        </table>

        <table border="0" cellpadding="0" cellspacing="0" width="800">
            <tr><td style="font-size: 3px; background-color: #105BA4; height: 3px;"></td></tr>
        </table>

        <table border="0" cellpadding="0" cellspacing="0" width="800">
        
        <tr><td style="width: 800px">

            <table border="0" cellpadding="0" cellspacing="0" width="800" style="height: 35px">
                <tr>
                    <td style="font-size: 10pt; font-family: Verdana; width: 96px; height: 32px;" align="left">
                        &nbsp;Client Name:
                    </td>
                    <td align="left" style="width: 285px; height: 32px;">
                        <asp:TextBox ID="Client_txt" runat="server" Width="130px" Font-Names="Verdana"></asp:TextBox>
                        <asp:TextBox ID="First_Name_txt" runat="server" Width="130px" Font-Names="Verdana"></asp:TextBox>
                    </td>
                    
                    <td style="font-size: 10pt; font-family: Verdana; width: 105px; height: 32px;" align="left">
                        &nbsp;Policy Number:</td>
                    <td align="left" style="width: 300px; height: 32px;">
                        <asp:TextBox ID="Policynumber_txt" runat="server" Width="152px"></asp:TextBox></td>
                </tr>
            </table>
                
        </td></tr>
        
        <tr><td style="width: 800px">

            <table border="0" cellpadding="0" cellspacing="0" width="800" style="height: 35px">
                <tr>
                    <td style="font-size: 10pt; font-family: Verdana; width: 96px;" align="left">
                        &nbsp;Provider: &nbsp;</td>
                    <td align="left" style="width: 285px">
                        <asp:TextBox ID="Provider_txt" runat="server" Width="280px"></asp:TextBox></td>
                    <td style="font-size: 10pt; font-family: Verdana; width: 105px;" align="left">
                        &nbsp;Product:&nbsp;</td>
                    <td align="left" style="width: 300px">
                        <asp:TextBox ID="Product_txt" runat="server" Width="296px"></asp:TextBox></td>
                </tr>
            </table>
                
        </td></tr>
        
        <tr><td style="width: 800px">

            <table border="0" cellpadding="0" cellspacing="0" width="800" style="height: 35px">
                <tr>
                    <td style="font-size: 10pt; font-family: Verdana; width: 96px;" align="left">
                        &nbsp;Year: &nbsp;</td>
                    <td align="left" style="width: 285px">
                        <asp:TextBox ID="Year_txt" runat="server" Width="64px" MaxLength="4"></asp:TextBox></td>
                    <td style="font-size: 10pt; font-family: Verdana; width: 105px;" align="left"></td>
                    <td align="left" style="width: 300px"></td>
                </tr>
            </table>
                
        </td></tr>

        <tr><td style="width: 800px">

            <table border="0" cellpadding="0" cellspacing="0" width="800" style="height: 35px">
                <tr>
                    <td style="width: 400px; height: 24px;">
                        <ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="Client_txt" WatermarkCssClass="WaterMk" WatermarkText="Last Name">
                        </ajaxToolkit:TextBoxWatermarkExtender>
                        <ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server" TargetControlID="First_Name_txt" WatermarkCssClass="WaterMk" WatermarkText="First Name">
                        </ajaxToolkit:TextBoxWatermarkExtender>
                        &nbsp;</td>
                    <td style="height: 24px">
                        <asp:Button ID="Search_btn" runat="server" Text="Search" BackColor="Gainsboro" Font-Names="Verdana" />
                    </td>
                    <td style="width: 59px; height: 24px;"></td>
                    <td style="height: 24px">
                        <asp:Button ID="Print_btn" runat="server" Text="Print Results" BackColor="Gainsboro" Font-Names="Verdana" Width="104px" Visible="False" />
                    </td>
                    <td style="height: 24px">
                        <asp:Button ID="Save_btn" runat="server" Text="Save as Excel" BackColor="Gainsboro" Font-Names="Verdana" Width="112px" Visible="False" />
                    </td>
                </tr>
            </table>
                
        </td></tr>

        </table>

        <table border="0" cellpadding="0" cellspacing="0" width="800">
            <tr><td style="font-size: 3px; background-color: #c0c0c0; height: 3px;"></td></tr>
        </table>

        <table border="0" cellpadding="0" cellspacing="0" width="800">
            <tr><td style="font-size: 3px; height: 20px;"></td></tr>
        </table>

        <table cellpadding="0" cellspacing="0" width="800px" style="font-family:Verdana; font-size:10pt">
            <tr>
            <td align="left" style="height: 16px"> Search Results: <asp:Label ID="results_label" runat="server" Text="0"></asp:Label></td>
            <td align="right" style="height: 16px;"> 
                <asp:LinkButton ID="AddNewPayment" runat="server" ForeColor="Black"
                    TabIndex="11" Font-Underline="True" CausesValidation="False">Add New Payment</asp:LinkButton></td>
            </tr>
        </table>
        
        <table cellpadding="0" cellspacing="0" width="800px" style="font-family:Verdana; font-size:3pt; height:3px">
            <tr><td>&nbsp;</td></tr>
        </table>        
        
        <table cellpadding="0" cellspacing="0">
            <tr><td style="width: 800px;">
                <asp:DataGrid ID="DataGrid" runat="server" AutoGenerateColumns="False" BackColor="White"
                    BorderColor="White" BorderStyle="Solid" BorderWidth="1px" CellPadding="1" Font-Names="Verdana" Width="800px" Font-Size="Small" TabIndex="12" AllowSorting="True" AllowPaging="True" PageSize="20">
                    <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                    <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                    <PagerStyle BackColor="White" ForeColor="#330099" HorizontalAlign="Left" Mode="NumericPages" PageButtonCount="9" Position="Top" />
                    <AlternatingItemStyle BackColor="#D7DADF" />
                    <ItemStyle BackColor="#F2F3F5" ForeColor="Black" />
                    <HeaderStyle BackColor="#105BA4" Font-Bold="True" ForeColor="White" />
                    <Columns>
                        <asp:BoundColumn DataField="POLICY_SEQ_CD" Visible="False"></asp:BoundColumn>
                        <asp:BoundColumn DataField="POLICY_PREMIUM_CD" Visible="False"></asp:BoundColumn>
                        <asp:BoundColumn DataField="payment_seq_cd" Visible="False"></asp:BoundColumn>
                        <asp:ButtonColumn CommandName="view_client" DataTextField="CLIENT_NAME" HeaderText="Name"
                            Text="Button">
                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                Font-Underline="False" HorizontalAlign="Left" />
                        </asp:ButtonColumn>
                        <asp:BoundColumn HeaderText="AR Number" DataField="PAYMENT_NO"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="Policy #" DataField="POLICY_NO">
                            <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" />
                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                Font-Underline="False" HorizontalAlign="Left" />
                        </asp:BoundColumn>
                        <asp:BoundColumn HeaderText="Provider" DataField="PROVIDER_DESC">
                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                Font-Underline="False" HorizontalAlign="Left" />
                            <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                Font-Underline="False" HorizontalAlign="Center" />
                        </asp:BoundColumn>
                        <asp:BoundColumn DataField="PRDT_DESC" HeaderText="Product">
                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                Font-Underline="False" HorizontalAlign="Left" />
                            <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                Font-Underline="False" HorizontalAlign="Center" />
                        </asp:BoundColumn>
                        <asp:BoundColumn HeaderText="Due Date" DataField="POLICY_DUE_DT" DataFormatString="{0:dd/MM/yyyy}"></asp:BoundColumn>
                        <asp:ButtonColumn CommandName="Edit" Text="Edit">
                            <HeaderStyle Width="10px" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" />
                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                Font-Underline="False" HorizontalAlign="Center" />
                        </asp:ButtonColumn>
                        <asp:TemplateColumn>
                            <HeaderStyle Width="15px" />
                            <ItemTemplate>
                                <asp:LinkButton ID="Delete_btn" runat="server" CommandName="Delete" ForeColor="Black">Delete</asp:LinkButton>
                                <ajaxToolkit:ConfirmButtonExtender
                                    ID="ConfirmButtonExtender1" runat="server" ConfirmText="Continue delete?" TargetControlID="Delete_btn">
                                </ajaxToolkit:ConfirmButtonExtender>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                Font-Underline="False" HorizontalAlign="Center" />
                        </asp:TemplateColumn>
                        <asp:ButtonColumn CommandName="View" Text="View">
                            <HeaderStyle Width="15px" />
                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                Font-Underline="False" HorizontalAlign="Center" />
                        </asp:ButtonColumn>
                    </Columns>
                </asp:DataGrid></td></tr>
        </table>        
    </div>
    <asp:RequiredFieldValidator ID="rfv_policyno" runat="server" ControlToValidate="Policynumber_txt"
        ErrorMessage="Required Field : Policy Number" ForeColor="White">-</asp:RequiredFieldValidator>
    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server"
        TargetControlID="rfv_policyno">
    </ajaxToolkit:ValidatorCalloutExtender>
    <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server"
        FilterType="Numbers" TargetControlID="Year_txt">
    </ajaxToolkit:FilteredTextBoxExtender>
</asp:Content>
